#include "widget.h"
#include "ui_widget.h"
#include <QFormLayout>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>


Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QFormLayout* layout = new QFormLayout;
    QLabel* label1 = new QLabel;
    label1->setText("学号");
    QLabel* label2 = new QLabel;
    label2->setText("姓名");
    QLabel* label3 = new QLabel;
    label3->setText("住址");

    QLineEdit* l1 = new QLineEdit;
    QLineEdit* l2 = new QLineEdit;
    QLineEdit* l3 = new QLineEdit;

    layout->addRow(label1,l1);
    layout->addRow(label2,l2);
    layout->addRow(label3,l3);

    QPushButton* b = new QPushButton;
    b->setText("提交");
    layout->addRow(nullptr,b);

    this->setLayout(layout);

}

Widget::~Widget()
{
    delete ui;
}

